/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package DTO;

import java.sql.Date;

/**
 *
 * @author Endlesslove
 */
public class PhieuThuTien  implements  Idata
{
    private String MaPhieuThu;
    public String MaKhachHang;
    public String NgayThuTien;
    public int SoTienThu;
    public PhieuThuTien(String ...param)
    {
        try
        {
            MaPhieuThu = param[0];
            MaKhachHang = param[1];
            NgayThuTien = param[2];
            SoTienThu = Integer.parseInt(param[3]);
        }
        catch(Exception ie){}
    }
    
    @Override
    public boolean Delete() 
    {
        return new BUS.PhieuThuTien().Delete(this);
    }

    @Override
    public boolean Insert() 
    {
        return new BUS.PhieuThuTien().Insert(this);
    }

    @Override
    public boolean Update() 
    {
        return new BUS.PhieuThuTien().Update(this);
    }

    @Override
    public Object[] getObjects() 
    {
        return new Object[]
        {
            MaPhieuThu, MaKhachHang, NgayThuTien, SoTienThu
        };
    }
    @Override
    public String getID() 
    {
        return MaPhieuThu;
    }
    
}
